home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Views / Arrangements / ArrangementBase.h < prev    next >
Text File  |  1997-06-28  |  1KB  |  46 lines

  1. // ArrangementBase.h
  2.  
  3. #ifndef ArrangementBase_h
  4. #define ArrangementBase_h
  5.  
  6. #ifndef View_h
  7. #include "View.h"
  8. #endif
  9. #ifndef ArrangedPane_h
  10. #include "ArrangedPane.h"
  11. #endif
  12.  
  13. class ArrangementBase: public View
  14.   {
  15.     private:
  16.         ArrangedPane *const panes;
  17.         const uint32 paneCount;
  18.     
  19.     protected:
  20.         void SetParents();
  21.         
  22.         virtual void GainMapping();
  23.         virtual void LoseMapping();
  24.         virtual void ChangeBounds( Rectangle oldBounds );
  25.         
  26.         virtual void Arrange( Rectangle ) = 0;
  27.     
  28.     public:
  29.         ArrangementBase( ArrangedPane *thePanes,
  30.                               uint32 paneCount );
  31.         
  32.         uint32 PaneCount() const                            { return paneCount; }
  33.         ArrangedPane& operator[]( uint32 i )            { Assert( i < paneCount ); return panes[i]; }
  34.         const Pane& operator[]( uint32 i ) const        { Assert( i < paneCount ); return panes[i]; }
  35.         
  36.         virtual void Draw( const ViewMap& ) const;
  37.         virtual TangibleView *Touch( PointObject );
  38.         
  39.         // These are handy for setting up overrides to the methods in Sizeable:
  40.             uint16 Minimum( uint16 (Sizeable::*dimension)() ) const;
  41.             uint16 Maximum( uint16 (Sizeable::*dimension)() ) const;
  42.             uint16 Total( uint16 (Sizeable::*dimension)() ) const;
  43.   };
  44.  
  45. #endif
  46.